package com.lantosec.hmrp.modules.archives.vo;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

import com.lantosec.hmrp.modules.archives.entity.UserHouse;
import com.lantosec.hmrp.core.mvc.BaseVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * <p>
 * 领导干部本人、配偶及共同生活的子女住房情况表 VO对象
 * </p>
 *
 * @author AutoCode
 * @since 2020-06-12
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value="UserHouse对象", description="领导干部本人、配偶及共同生活的子女住房情况表")
public class UserHouseVO extends BaseVO<UserHouse> {
    private static final long serialVersionUID = 1L;


    public UserHouseVO(UserHouse entity){
        this.userHouseId = entity.getUserHouseId();
        this.userId = entity.getUserId();
        this.familyId = entity.getFamilyId();
        this.familyName = entity.getFamilyName();
        this.familyAppellation = entity.getFamilyAppellation();
        this.familyWorkUnit = entity.getFamilyWorkUnit();
        this.houseAdr = entity.getHouseAdr();
        this.houseFloorage = entity.getHouseFloorage();
        this.houseNature = entity.getHouseNature();
        this.houseSource = entity.getHouseSource();
        this.houseOwner = entity.getHouseOwner();
        this.buyHouse = entity.getBuyHouse();
        this.saleHouse = entity.getSaleHouse();
        this.rentHouse = entity.getRentHouse();
        this.buildHouse = entity.getBuildHouse();
        this.otherRemark = entity.getOtherRemark();
        this.remark = entity.getRemark();
        this.createId = entity.getCreateId();
        this.createUser = entity.getCreateUser();
        this.createTime = entity.getCreateTime();
        this.verifyId = entity.getVerifyId();
        this.verifyUser = entity.getVerifyUser();
        this.verifyTime = entity.getVerifyTime();
        this.verifyStatus = entity.getVerifyStatus();
    }

    @Override
    public UserHouse convertToEntity(){
        return new UserHouse(this);
    }


    @ApiModelProperty(value = "主键ID")
    private String userHouseId;

    @ApiModelProperty(value = "用户主表ID")
    private String userId;

    @ApiModelProperty(value = "家庭成员ID")
    private String familyId;

    @ApiModelProperty(value = "家庭成员姓名")
    private String familyName;

    @ApiModelProperty(value = "家庭成员称谓，字典值")
    private String familyAppellation;

    @ApiModelProperty(value = "家庭成员工作单位")
    private String familyWorkUnit;

    @ApiModelProperty(value = "自住房屋地址")
    private String houseAdr;

    @ApiModelProperty(value = "房屋建筑面积")
    private BigDecimal houseFloorage;

    @ApiModelProperty(value = "房屋性质")
    private String houseNature;

    @ApiModelProperty(value = "自住房屋来源")
    private String houseSource;

    @ApiModelProperty(value = "产权人")
    private String houseOwner;

    @ApiModelProperty(value = "购买房屋信息，json包含字段（adr，房屋地址，字符串；floorage，建筑面积，小数；nature，房屋性质，字符串；buyDate，购房时间，字符串；buyMoney，购房金额，小数）")
    private String buyHouse;

    @ApiModelProperty(value = "出售房屋信息，json包含字段（adr，房屋地址，字符串；floorage，建筑面积，小数；nature，房屋性质，字符串；saleDate，售房时间，字符串；saleMoney，售房金额，小数）")
    private String saleHouse;

    @ApiModelProperty(value = "出租房屋信息，json包含字段（adr，房屋地址，字符串；floorage，建筑面积，小数；nature，房屋性质，字符串；deadline，租赁期限，字符串；yearMoney，年租金，小数）")
    private String rentHouse;

    @ApiModelProperty(value = "集资建房信息，json包含字段（adr，房屋地址，字符串；floorage，建筑面积，小数；buildUnit，集资单位，字符串；buildMoney，房款总额，小数；invest，个人支付，小数）")
    private String buildHouse;

    @ApiModelProperty(value = "其他情况")
    private String otherRemark;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "创建人ID")
    private String createId;

    @ApiModelProperty(value = "创建人姓名")
    private String createUser;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "审核人ID")
    private String verifyId;

    @ApiModelProperty(value = "审核人姓名")
    private String verifyUser;

    @ApiModelProperty(value = "审核时间")
    private Date verifyTime;

    @ApiModelProperty(value = "审核状态（0：未审核，1：以审核）")
    private Integer verifyStatus;

    @ApiModelProperty(value = "家庭成员称谓名称")
    private String familyAppellationName;
    @ApiModelProperty(value = "审核通过状态")
    private Integer state;

    private List<UserHouseDetailVO> userHouseDetailVO;
}
